#ifndef _PROCESS_H_
#define _PROCESS_H_


/*
	class : Process
	desc : Encapsulates data for a process tells all I would need to know
		regarding the actual process.
*/
class Process
{

	protected :
		//this deals with setting the program memory and
		//reprogramming the embedded microcontrollers as needed.
		unsigned long int programCounterStartLocation;
		unsigned long int programCounterEndLocation;
		unsigned long int programCounterOffset; //gives the offset of 
		//program counter.
		Allocator* programCounterAllocator;
		
		unsigned long int stackFrameStartLocation;
		unsigned long int stackFrameEndLocation;
		unsigned long int stackFrameOffset; //gives offset of stack.
		Allocator* stackFrameAllocator;

		unsigned long int heapStartLocation; //tells where the heap starts
		unsigned long int headEndLocation; //tells where the heap ends.
		Allocator* heapAllocator;
		
		unsigned long int staticStartLocation; //tells where static starts
		unsigned long int staticEndLocation; //tells where static ends
		Allocator* staticAllocator;

	//it looks like a lot but it really shouldn't be in reality.
	//this deals with the actual pins and ports of the device.
	unsigned char* pinStates;
	unsigned char pinNumber; //number of pins.
	virtual void savePinStates()=0;
	virtual void loadPinStates()=0;

	//threads that are run in the program
	Thread* masterThread; //this is the main thread of the process
	//that spawns other threads using the same process stuff status.

	ThreadSwitcher threads; //works with threads that are in the process.

	public: 
		//saves the program state to disk memory
		virtual void save()=0;
		//loads a programs state from disk memory.
		virtual Process load()=0; 
		
		
};



#endif
